// Generated from /home/david/NetBeansProjects/compiladorcc1/src/t1/Lua.g4 by ANTLR 4.0
package t1;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.misc.*;
import org.antlr.v4.runtime.tree.*;
import java.util.List;
import java.util.Iterator;
import java.util.ArrayList;

@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
public class LuaParser extends Parser {
	protected static final DFA[] _decisionToDFA;
	protected static final PredictionContextCache _sharedContextCache =
		new PredictionContextCache();
	public static final int
		REPEAT=1, DO=2, UNTIL=3, WHILE=4, IF=5, THEN=6, ELSE=7, ELSEIF=8, END=9, 
		FOR=10, FUNCTION=11, RETURN=12, BREAK=13, IN=14, LOCAL=15, NIL=16, NULL=17, 
		FALSE=18, TRUE=19, PONTO=20, DOI_PON=21, VIRGULA=22, ATRIB=23, PON_VIR=24, 
		RETIC=25, ASPAS=26, ABR_COL=27, FEC_COL=28, ABR_PAR=29, FEC_PAR=30, ABR_CHA=31, 
		FEC_CHA=32, WS=33, Comentario=34, Nome=35, Numero=36, Cadeia=37, MAIS=38, 
		MENOS=39, MUL=40, DIV=41, EXP=42, MOD=43, CONCAT=44, MENOR=45, MENOR_IGUAL=46, 
		MAIOR=47, MAIOR_IGUAL=48, IGUAL=49, DIFE=50, AND=51, OR=52, NOT=53, CERQ=54;
	public static final String[] tokenNames = {
		"<INVALID>", "'repeat'", "'do'", "'until'", "'while'", "'if'", "'then'", 
		"'else'", "'elseif'", "'end'", "'for'", "'function'", "'return'", "'break'", 
		"'in'", "'local'", "'nil'", "'null'", "'false'", "'true'", "'.'", "':'", 
		"','", "'='", "';'", "'...'", "'''", "'['", "']'", "'('", "')'", "'{'", 
		"'}'", "WS", "Comentario", "Nome", "Numero", "Cadeia", "'+'", "'-'", "'*'", 
		"'/'", "'^'", "'%'", "'..'", "'<'", "'<='", "'>'", "'>='", "'=='", "'~='", 
		"'and'", "'or'", "'not'", "'#'"
	};
	public static final int
		RULE_programa = 0, RULE_trecho = 1, RULE_bloco = 2, RULE_comando = 3, 
		RULE_ultimocomando = 4, RULE_nomedafuncao = 5, RULE_listavar = 6, RULE_var = 7, 
		RULE_listadenomes = 8, RULE_listaexp = 9, RULE_exp = 10, RULE_chamadadefuncao = 11, 
		RULE_expprefixo = 12, RULE_expprefixo2 = 13, RULE_args = 14, RULE_funcao = 15, 
		RULE_corpodafuncao = 16, RULE_listapar = 17, RULE_construtortabela = 18, 
		RULE_listadecampos = 19, RULE_campo = 20, RULE_separadordecampos = 21, 
		RULE_opbin = 22, RULE_opunaria = 23;
	public static final String[] ruleNames = {
		"programa", "trecho", "bloco", "comando", "ultimocomando", "nomedafuncao", 
		"listavar", "var", "listadenomes", "listaexp", "exp", "chamadadefuncao", 
		"expprefixo", "expprefixo2", "args", "funcao", "corpodafuncao", "listapar", 
		"construtortabela", "listadecampos", "campo", "separadordecampos", "opbin", 
		"opunaria"
	};

	@Override
	public String getGrammarFileName() { return "Lua.g4"; }

	@Override
	public String[] getTokenNames() { return tokenNames; }

	@Override
	public String[] getRuleNames() { return ruleNames; }

	@Override
	public ATN getATN() { return _ATN; }

	public LuaParser(TokenStream input) {
		super(input);
		_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
	}
	public static class ProgramaContext extends ParserRuleContext {
		public TrechoContext trecho() {
			return getRuleContext(TrechoContext.class,0);
		}
		public ProgramaContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_programa; }
	}

	public final ProgramaContext programa() throws RecognitionException {
		ProgramaContext _localctx = new ProgramaContext(_ctx, getState());
		enterRule(_localctx, 0, RULE_programa);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(48); trecho();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class TrechoContext extends ParserRuleContext {
		public List<ComandoContext> comando() {
			return getRuleContexts(ComandoContext.class);
		}
		public UltimocomandoContext ultimocomando() {
			return getRuleContext(UltimocomandoContext.class,0);
		}
		public TerminalNode PON_VIR(int i) {
			return getToken(LuaParser.PON_VIR, i);
		}
		public ComandoContext comando(int i) {
			return getRuleContext(ComandoContext.class,i);
		}
		public List<TerminalNode> PON_VIR() { return getTokens(LuaParser.PON_VIR); }
		public TrechoContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_trecho; }
	}

	public final TrechoContext trecho() throws RecognitionException {
		TrechoContext _localctx = new TrechoContext(_ctx, getState());
		enterRule(_localctx, 2, RULE_trecho);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(56);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << REPEAT) | (1L << DO) | (1L << WHILE) | (1L << IF) | (1L << FOR) | (1L << FUNCTION) | (1L << LOCAL) | (1L << Nome))) != 0)) {
				{
				{
				setState(50); comando();
				setState(52);
				_la = _input.LA(1);
				if (_la==PON_VIR) {
					{
					setState(51); match(PON_VIR);
					}
				}

				}
				}
				setState(58);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			setState(63);
			_la = _input.LA(1);
			if (_la==RETURN || _la==BREAK) {
				{
				setState(59); ultimocomando();
				setState(61);
				_la = _input.LA(1);
				if (_la==PON_VIR) {
					{
					setState(60); match(PON_VIR);
					}
				}

				}
			}

			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class BlocoContext extends ParserRuleContext {
		public TrechoContext trecho() {
			return getRuleContext(TrechoContext.class,0);
		}
		public BlocoContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_bloco; }
	}

	public final BlocoContext bloco() throws RecognitionException {
		BlocoContext _localctx = new BlocoContext(_ctx, getState());
		enterRule(_localctx, 4, RULE_bloco);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(65); trecho();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ComandoContext extends ParserRuleContext {
		public Token Nome;
		public TerminalNode FUNCTION() { return getToken(LuaParser.FUNCTION, 0); }
		public TerminalNode WHILE() { return getToken(LuaParser.WHILE, 0); }
		public List<TerminalNode> VIRGULA() { return getTokens(LuaParser.VIRGULA); }
		public TerminalNode ELSE() { return getToken(LuaParser.ELSE, 0); }
		public BlocoContext bloco(int i) {
			return getRuleContext(BlocoContext.class,i);
		}
		public TerminalNode DO() { return getToken(LuaParser.DO, 0); }
		public TerminalNode FOR() { return getToken(LuaParser.FOR, 0); }
		public List<BlocoContext> bloco() {
			return getRuleContexts(BlocoContext.class);
		}
		public TerminalNode LOCAL() { return getToken(LuaParser.LOCAL, 0); }
		public ListadenomesContext listadenomes() {
			return getRuleContext(ListadenomesContext.class,0);
		}
		public ExpContext exp(int i) {
			return getRuleContext(ExpContext.class,i);
		}
		public TerminalNode IF() { return getToken(LuaParser.IF, 0); }
		public List<TerminalNode> ELSEIF() { return getTokens(LuaParser.ELSEIF); }
		public TerminalNode ATRIB() { return getToken(LuaParser.ATRIB, 0); }
		public TerminalNode IN() { return getToken(LuaParser.IN, 0); }
		public List<TerminalNode> THEN() { return getTokens(LuaParser.THEN); }
		public TerminalNode ELSEIF(int i) {
			return getToken(LuaParser.ELSEIF, i);
		}
		public CorpodafuncaoContext corpodafuncao() {
			return getRuleContext(CorpodafuncaoContext.class,0);
		}
		public TerminalNode UNTIL() { return getToken(LuaParser.UNTIL, 0); }
		public ChamadadefuncaoContext chamadadefuncao() {
			return getRuleContext(ChamadadefuncaoContext.class,0);
		}
		public ListaexpContext listaexp() {
			return getRuleContext(ListaexpContext.class,0);
		}
		public List<ExpContext> exp() {
			return getRuleContexts(ExpContext.class);
		}
		public TerminalNode THEN(int i) {
			return getToken(LuaParser.THEN, i);
		}
		public TerminalNode VIRGULA(int i) {
			return getToken(LuaParser.VIRGULA, i);
		}
		public TerminalNode REPEAT() { return getToken(LuaParser.REPEAT, 0); }
		public TerminalNode END() { return getToken(LuaParser.END, 0); }
		public NomedafuncaoContext nomedafuncao() {
			return getRuleContext(NomedafuncaoContext.class,0);
		}
		public ListavarContext listavar() {
			return getRuleContext(ListavarContext.class,0);
		}
		public TerminalNode Nome() { return getToken(LuaParser.Nome, 0); }
		public ComandoContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_comando; }
	}

	public final ComandoContext comando() throws RecognitionException {
		ComandoContext _localctx = new ComandoContext(_ctx, getState());
		enterRule(_localctx, 6, RULE_comando);
		int _la;
		try {
			setState(144);
			switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) {
			case 1:
				enterOuterAlt(_localctx, 1);
				{
				setState(67); listavar();
				setState(68); match(ATRIB);
				setState(69); listaexp();
				}
				break;

			case 2:
				enterOuterAlt(_localctx, 2);
				{
				setState(71); chamadadefuncao();
				}
				break;

			case 3:
				enterOuterAlt(_localctx, 3);
				{
				setState(72); match(DO);
				setState(73); bloco();
				setState(74); match(END);
				}
				break;

			case 4:
				enterOuterAlt(_localctx, 4);
				{
				setState(76); match(WHILE);
				setState(77); exp(0);
				setState(78); match(DO);
				setState(79); bloco();
				setState(80); match(END);
				}
				break;

			case 5:
				enterOuterAlt(_localctx, 5);
				{
				setState(82); match(REPEAT);
				setState(83); bloco();
				setState(84); match(UNTIL);
				setState(85); exp(0);
				}
				break;

			case 6:
				enterOuterAlt(_localctx, 6);
				{
				setState(87); match(IF);
				setState(88); exp(0);
				setState(89); match(THEN);
				setState(90); bloco();
				setState(98);
				_errHandler.sync(this);
				_la = _input.LA(1);
				while (_la==ELSEIF) {
					{
					{
					setState(91); match(ELSEIF);
					setState(92); exp(0);
					setState(93); match(THEN);
					setState(94); bloco();
					}
					}
					setState(100);
					_errHandler.sync(this);
					_la = _input.LA(1);
				}
				setState(103);
				_la = _input.LA(1);
				if (_la==ELSE) {
					{
					setState(101); match(ELSE);
					setState(102); bloco();
					}
				}

				setState(105); match(END);
				}
				break;

			case 7:
				enterOuterAlt(_localctx, 7);
				{
				setState(107); match(FOR);
				setState(108); match(Nome);
				setState(109); match(ATRIB);
				setState(110); exp(0);
				setState(111); match(VIRGULA);
				setState(112); exp(0);
				setState(115);
				_la = _input.LA(1);
				if (_la==VIRGULA) {
					{
					setState(113); match(VIRGULA);
					setState(114); exp(0);
					}
				}

				setState(117); match(DO);
				setState(118); bloco();
				setState(119); match(END);
				}
				break;

			case 8:
				enterOuterAlt(_localctx, 8);
				{
				setState(121); match(FOR);
				setState(122); listadenomes();
				setState(123); match(IN);
				setState(124); listaexp();
				setState(125); match(DO);
				setState(126); bloco();
				setState(127); match(END);
				}
				break;

			case 9:
				enterOuterAlt(_localctx, 9);
				{
				setState(129); match(FUNCTION);
				setState(130); nomedafuncao();
				setState(131); corpodafuncao();
				}
				break;

			case 10:
				enterOuterAlt(_localctx, 10);
				{
				setState(133); match(LOCAL);
				setState(134); match(FUNCTION);
				setState(135); ((ComandoContext)_localctx).Nome = match(Nome);
				 TabelaDeSimbolos.adicionarSimbolo((((ComandoContext)_localctx).Nome!=null?((ComandoContext)_localctx).Nome.getText():null),Tipo.FUNCAO); 
				setState(137); corpodafuncao();
				}
				break;

			case 11:
				enterOuterAlt(_localctx, 11);
				{
				setState(138); match(LOCAL);
				setState(139); listadenomes();
				setState(142);
				_la = _input.LA(1);
				if (_la==ATRIB) {
					{
					setState(140); match(ATRIB);
					setState(141); listaexp();
					}
				}

				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class UltimocomandoContext extends ParserRuleContext {
		public TerminalNode BREAK() { return getToken(LuaParser.BREAK, 0); }
		public ListaexpContext listaexp() {
			return getRuleContext(ListaexpContext.class,0);
		}
		public TerminalNode RETURN() { return getToken(LuaParser.RETURN, 0); }
		public UltimocomandoContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_ultimocomando; }
	}

	public final UltimocomandoContext ultimocomando() throws RecognitionException {
		UltimocomandoContext _localctx = new UltimocomandoContext(_ctx, getState());
		enterRule(_localctx, 8, RULE_ultimocomando);
		int _la;
		try {
			setState(151);
			switch (_input.LA(1)) {
			case RETURN:
				enterOuterAlt(_localctx, 1);
				{
				setState(146); match(RETURN);
				setState(148);
				_la = _input.LA(1);
				if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << FUNCTION) | (1L << NIL) | (1L << FALSE) | (1L << TRUE) | (1L << RETIC) | (1L << ABR_PAR) | (1L << ABR_CHA) | (1L << Nome) | (1L << Numero) | (1L << Cadeia) | (1L << MENOS) | (1L << NOT) | (1L << CERQ))) != 0)) {
					{
					setState(147); listaexp();
					}
				}

				}
				break;
			case BREAK:
				enterOuterAlt(_localctx, 2);
				{
				setState(150); match(BREAK);
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class NomedafuncaoContext extends ParserRuleContext {
		public Token Nome;
		public List<TerminalNode> PONTO() { return getTokens(LuaParser.PONTO); }
		public TerminalNode PONTO(int i) {
			return getToken(LuaParser.PONTO, i);
		}
		public TerminalNode Nome(int i) {
			return getToken(LuaParser.Nome, i);
		}
		public TerminalNode DOI_PON() { return getToken(LuaParser.DOI_PON, 0); }
		public List<TerminalNode> Nome() { return getTokens(LuaParser.Nome); }
		public NomedafuncaoContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_nomedafuncao; }
	}

	public final NomedafuncaoContext nomedafuncao() throws RecognitionException {
		NomedafuncaoContext _localctx = new NomedafuncaoContext(_ctx, getState());
		enterRule(_localctx, 10, RULE_nomedafuncao);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(153); ((NomedafuncaoContext)_localctx).Nome = match(Nome);
			 TabelaDeSimbolos.adicionarSimbolo((((NomedafuncaoContext)_localctx).Nome!=null?((NomedafuncaoContext)_localctx).Nome.getText():null),Tipo.FUNCAO); 
			setState(160);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==PONTO) {
				{
				{
				setState(155); match(PONTO);
				setState(156); ((NomedafuncaoContext)_localctx).Nome = match(Nome);
				 TabelaDeSimbolos.adicionarSimbolo((((NomedafuncaoContext)_localctx).Nome!=null?((NomedafuncaoContext)_localctx).Nome.getText():null),Tipo.FUNCAO); 
				}
				}
				setState(162);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			setState(165);
			_la = _input.LA(1);
			if (_la==DOI_PON) {
				{
				setState(163); match(DOI_PON);
				setState(164); ((NomedafuncaoContext)_localctx).Nome = match(Nome);
				}
			}

			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ListavarContext extends ParserRuleContext {
		public TerminalNode VIRGULA(int i) {
			return getToken(LuaParser.VIRGULA, i);
		}
		public List<VarContext> var() {
			return getRuleContexts(VarContext.class);
		}
		public List<TerminalNode> VIRGULA() { return getTokens(LuaParser.VIRGULA); }
		public VarContext var(int i) {
			return getRuleContext(VarContext.class,i);
		}
		public ListavarContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_listavar; }
	}

	public final ListavarContext listavar() throws RecognitionException {
		ListavarContext _localctx = new ListavarContext(_ctx, getState());
		enterRule(_localctx, 12, RULE_listavar);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(167); var();
			setState(172);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==VIRGULA) {
				{
				{
				setState(168); match(VIRGULA);
				setState(169); var();
				}
				}
				setState(174);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class VarContext extends ParserRuleContext {
		public Token Nome;
		public TerminalNode ABR_COL() { return getToken(LuaParser.ABR_COL, 0); }
		public ExpContext exp() {
			return getRuleContext(ExpContext.class,0);
		}
		public Expprefixo2Context expprefixo2() {
			return getRuleContext(Expprefixo2Context.class,0);
		}
		public TerminalNode PONTO() { return getToken(LuaParser.PONTO, 0); }
		public TerminalNode FEC_COL() { return getToken(LuaParser.FEC_COL, 0); }
		public TerminalNode Nome() { return getToken(LuaParser.Nome, 0); }
		public VarContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_var; }
	}

	public final VarContext var() throws RecognitionException {
		VarContext _localctx = new VarContext(_ctx, getState());
		enterRule(_localctx, 14, RULE_var);
		try {
			setState(187);
			switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) {
			case 1:
				enterOuterAlt(_localctx, 1);
				{
				setState(175); ((VarContext)_localctx).Nome = match(Nome);
				 TabelaDeSimbolos.adicionarSimbolo((((VarContext)_localctx).Nome!=null?((VarContext)_localctx).Nome.getText():null),Tipo.VARIAVEL); 
				}
				break;

			case 2:
				enterOuterAlt(_localctx, 2);
				{
				setState(177); expprefixo2();
				setState(178); match(ABR_COL);
				setState(179); exp(0);
				setState(180); match(FEC_COL);
				}
				break;

			case 3:
				enterOuterAlt(_localctx, 3);
				{
				setState(182); expprefixo2();
				setState(183); match(PONTO);
				setState(184); ((VarContext)_localctx).Nome = match(Nome);
				 TabelaDeSimbolos.adicionarSimbolo((((VarContext)_localctx).Nome!=null?((VarContext)_localctx).Nome.getText():null),Tipo.VARIAVEL); 
				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ListadenomesContext extends ParserRuleContext {
		public TerminalNode VIRGULA(int i) {
			return getToken(LuaParser.VIRGULA, i);
		}
		public List<TerminalNode> VIRGULA() { return getTokens(LuaParser.VIRGULA); }
		public TerminalNode Nome(int i) {
			return getToken(LuaParser.Nome, i);
		}
		public List<TerminalNode> Nome() { return getTokens(LuaParser.Nome); }
		public ListadenomesContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_listadenomes; }
	}

	public final ListadenomesContext listadenomes() throws RecognitionException {
		ListadenomesContext _localctx = new ListadenomesContext(_ctx, getState());
		enterRule(_localctx, 16, RULE_listadenomes);
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			setState(189); match(Nome);
			setState(194);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,15,_ctx);
			while ( _alt!=2 && _alt!=-1 ) {
				if ( _alt==1 ) {
					{
					{
					setState(190); match(VIRGULA);
					setState(191); match(Nome);
					}
					} 
				}
				setState(196);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,15,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ListaexpContext extends ParserRuleContext {
		public List<ExpContext> exp() {
			return getRuleContexts(ExpContext.class);
		}
		public TerminalNode VIRGULA(int i) {
			return getToken(LuaParser.VIRGULA, i);
		}
		public List<TerminalNode> VIRGULA() { return getTokens(LuaParser.VIRGULA); }
		public ExpContext exp(int i) {
			return getRuleContext(ExpContext.class,i);
		}
		public ListaexpContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_listaexp; }
	}

	public final ListaexpContext listaexp() throws RecognitionException {
		ListaexpContext _localctx = new ListaexpContext(_ctx, getState());
		enterRule(_localctx, 18, RULE_listaexp);
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			setState(202);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,16,_ctx);
			while ( _alt!=2 && _alt!=-1 ) {
				if ( _alt==1 ) {
					{
					{
					setState(197); exp(0);
					setState(198); match(VIRGULA);
					}
					} 
				}
				setState(204);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,16,_ctx);
			}
			setState(205); exp(0);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ExpContext extends ParserRuleContext {
		public int _p;
		public TerminalNode RETIC() { return getToken(LuaParser.RETIC, 0); }
		public OpbinContext opbin() {
			return getRuleContext(OpbinContext.class,0);
		}
		public TerminalNode Numero() { return getToken(LuaParser.Numero, 0); }
		public OpunariaContext opunaria() {
			return getRuleContext(OpunariaContext.class,0);
		}
		public ConstrutortabelaContext construtortabela() {
			return getRuleContext(ConstrutortabelaContext.class,0);
		}
		public TerminalNode NIL() { return getToken(LuaParser.NIL, 0); }
		public ExpprefixoContext expprefixo() {
			return getRuleContext(ExpprefixoContext.class,0);
		}
		public List<ExpContext> exp() {
			return getRuleContexts(ExpContext.class);
		}
		public FuncaoContext funcao() {
			return getRuleContext(FuncaoContext.class,0);
		}
		public ExpContext exp(int i) {
			return getRuleContext(ExpContext.class,i);
		}
		public TerminalNode FALSE() { return getToken(LuaParser.FALSE, 0); }
		public TerminalNode TRUE() { return getToken(LuaParser.TRUE, 0); }
		public TerminalNode Cadeia() { return getToken(LuaParser.Cadeia, 0); }
		public ExpContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); }
		public ExpContext(ParserRuleContext parent, int invokingState, int _p) {
			super(parent, invokingState);
			this._p = _p;
		}
		@Override public int getRuleIndex() { return RULE_exp; }
	}

	public final ExpContext exp(int _p) throws RecognitionException {
		ParserRuleContext _parentctx = _ctx;
		int _parentState = getState();
		ExpContext _localctx = new ExpContext(_ctx, _parentState, _p);
		ExpContext _prevctx = _localctx;
		int _startState = 20;
		enterRecursionRule(_localctx, RULE_exp);
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			setState(220);
			switch (_input.LA(1)) {
			case MENOS:
			case NOT:
			case CERQ:
				{
				setState(208); opunaria();
				setState(209); exp(1);
				}
				break;
			case NIL:
				{
				setState(211); match(NIL);
				}
				break;
			case FALSE:
				{
				setState(212); match(FALSE);
				}
				break;
			case TRUE:
				{
				setState(213); match(TRUE);
				}
				break;
			case Numero:
				{
				setState(214); match(Numero);
				}
				break;
			case Cadeia:
				{
				setState(215); match(Cadeia);
				}
				break;
			case RETIC:
				{
				setState(216); match(RETIC);
				}
				break;
			case FUNCTION:
				{
				setState(217); funcao();
				}
				break;
			case ABR_PAR:
			case Nome:
				{
				setState(218); expprefixo();
				}
				break;
			case ABR_CHA:
				{
				setState(219); construtortabela();
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
			_ctx.stop = _input.LT(-1);
			setState(228);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,18,_ctx);
			while ( _alt!=2 && _alt!=-1 ) {
				if ( _alt==1 ) {
					if ( _parseListeners!=null ) triggerExitRuleEvent();
					_prevctx = _localctx;
					{
					{
					_localctx = new ExpContext(_parentctx, _parentState, _p);
					pushNewRecursionContext(_localctx, _startState, RULE_exp);
					setState(222);
					if (!(2 >= _localctx._p)) throw new FailedPredicateException(this, "2 >= $_p");
					setState(223); opbin();
					setState(224); exp(0);
					}
					} 
				}
				setState(230);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,18,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			unrollRecursionContexts(_parentctx);
		}
		return _localctx;
	}

	public static class ChamadadefuncaoContext extends ParserRuleContext {
		public Expprefixo2Context expprefixo2() {
			return getRuleContext(Expprefixo2Context.class,0);
		}
		public ArgsContext args() {
			return getRuleContext(ArgsContext.class,0);
		}
		public TerminalNode DOI_PON() { return getToken(LuaParser.DOI_PON, 0); }
		public TerminalNode Nome() { return getToken(LuaParser.Nome, 0); }
		public ChamadadefuncaoContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_chamadadefuncao; }
	}

	public final ChamadadefuncaoContext chamadadefuncao() throws RecognitionException {
		ChamadadefuncaoContext _localctx = new ChamadadefuncaoContext(_ctx, getState());
		enterRule(_localctx, 22, RULE_chamadadefuncao);
		try {
			setState(239);
			switch ( getInterpreter().adaptivePredict(_input,19,_ctx) ) {
			case 1:
				enterOuterAlt(_localctx, 1);
				{
				setState(231); expprefixo2();
				setState(232); args();
				}
				break;

			case 2:
				enterOuterAlt(_localctx, 2);
				{
				setState(234); expprefixo2();
				setState(235); match(DOI_PON);
				setState(236); match(Nome);
				setState(237); args();
				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ExpprefixoContext extends ParserRuleContext {
		public ExpContext exp() {
			return getRuleContext(ExpContext.class,0);
		}
		public TerminalNode ABR_PAR() { return getToken(LuaParser.ABR_PAR, 0); }
		public VarContext var() {
			return getRuleContext(VarContext.class,0);
		}
		public TerminalNode FEC_PAR() { return getToken(LuaParser.FEC_PAR, 0); }
		public ChamadadefuncaoContext chamadadefuncao() {
			return getRuleContext(ChamadadefuncaoContext.class,0);
		}
		public ExpprefixoContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_expprefixo; }
	}

	public final ExpprefixoContext expprefixo() throws RecognitionException {
		ExpprefixoContext _localctx = new ExpprefixoContext(_ctx, getState());
		enterRule(_localctx, 24, RULE_expprefixo);
		try {
			setState(247);
			switch ( getInterpreter().adaptivePredict(_input,20,_ctx) ) {
			case 1:
				enterOuterAlt(_localctx, 1);
				{
				setState(241); var();
				}
				break;

			case 2:
				enterOuterAlt(_localctx, 2);
				{
				setState(242); chamadadefuncao();
				}
				break;

			case 3:
				enterOuterAlt(_localctx, 3);
				{
				setState(243); match(ABR_PAR);
				setState(244); exp(0);
				setState(245); match(FEC_PAR);
				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Expprefixo2Context extends ParserRuleContext {
		public Token Nome;
		public List<TerminalNode> ABR_COL() { return getTokens(LuaParser.ABR_COL); }
		public List<ExpContext> exp() {
			return getRuleContexts(ExpContext.class);
		}
		public List<TerminalNode> PONTO() { return getTokens(LuaParser.PONTO); }
		public TerminalNode FEC_COL(int i) {
			return getToken(LuaParser.FEC_COL, i);
		}
		public TerminalNode PONTO(int i) {
			return getToken(LuaParser.PONTO, i);
		}
		public List<TerminalNode> FEC_COL() { return getTokens(LuaParser.FEC_COL); }
		public TerminalNode Nome(int i) {
			return getToken(LuaParser.Nome, i);
		}
		public ExpContext exp(int i) {
			return getRuleContext(ExpContext.class,i);
		}
		public TerminalNode ABR_COL(int i) {
			return getToken(LuaParser.ABR_COL, i);
		}
		public List<TerminalNode> Nome() { return getTokens(LuaParser.Nome); }
		public Expprefixo2Context(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_expprefixo2; }
	}

	public final Expprefixo2Context expprefixo2() throws RecognitionException {
		Expprefixo2Context _localctx = new Expprefixo2Context(_ctx, getState());
		enterRule(_localctx, 26, RULE_expprefixo2);
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			setState(249); ((Expprefixo2Context)_localctx).Nome = match(Nome);
			 TabelaDeSimbolos.adicionarSimbolo((((Expprefixo2Context)_localctx).Nome!=null?((Expprefixo2Context)_localctx).Nome.getText():null),Tipo.VARIAVEL); 
			setState(260);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,22,_ctx);
			while ( _alt!=2 && _alt!=-1 ) {
				if ( _alt==1 ) {
					{
					setState(258);
					switch (_input.LA(1)) {
					case ABR_COL:
						{
						setState(251); match(ABR_COL);
						setState(252); exp(0);
						setState(253); match(FEC_COL);
						}
						break;
					case PONTO:
						{
						setState(255); match(PONTO);
						setState(256); ((Expprefixo2Context)_localctx).Nome = match(Nome);
						 TabelaDeSimbolos.adicionarSimbolo((((Expprefixo2Context)_localctx).Nome!=null?((Expprefixo2Context)_localctx).Nome.getText():null),Tipo.VARIAVEL); 
						}
						break;
					default:
						throw new NoViableAltException(this);
					}
					} 
				}
				setState(262);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,22,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ArgsContext extends ParserRuleContext {
		public ConstrutortabelaContext construtortabela() {
			return getRuleContext(ConstrutortabelaContext.class,0);
		}
		public TerminalNode ABR_PAR() { return getToken(LuaParser.ABR_PAR, 0); }
		public TerminalNode Cadeia() { return getToken(LuaParser.Cadeia, 0); }
		public TerminalNode FEC_PAR() { return getToken(LuaParser.FEC_PAR, 0); }
		public ListaexpContext listaexp() {
			return getRuleContext(ListaexpContext.class,0);
		}
		public ArgsContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_args; }
	}

	public final ArgsContext args() throws RecognitionException {
		ArgsContext _localctx = new ArgsContext(_ctx, getState());
		enterRule(_localctx, 28, RULE_args);
		int _la;
		try {
			setState(270);
			switch (_input.LA(1)) {
			case ABR_PAR:
				enterOuterAlt(_localctx, 1);
				{
				setState(263); match(ABR_PAR);
				setState(265);
				_la = _input.LA(1);
				if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << FUNCTION) | (1L << NIL) | (1L << FALSE) | (1L << TRUE) | (1L << RETIC) | (1L << ABR_PAR) | (1L << ABR_CHA) | (1L << Nome) | (1L << Numero) | (1L << Cadeia) | (1L << MENOS) | (1L << NOT) | (1L << CERQ))) != 0)) {
					{
					setState(264); listaexp();
					}
				}

				setState(267); match(FEC_PAR);
				}
				break;
			case ABR_CHA:
				enterOuterAlt(_localctx, 2);
				{
				setState(268); construtortabela();
				}
				break;
			case Cadeia:
				enterOuterAlt(_localctx, 3);
				{
				setState(269); match(Cadeia);
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class FuncaoContext extends ParserRuleContext {
		public TerminalNode FUNCTION() { return getToken(LuaParser.FUNCTION, 0); }
		public CorpodafuncaoContext corpodafuncao() {
			return getRuleContext(CorpodafuncaoContext.class,0);
		}
		public FuncaoContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_funcao; }
	}

	public final FuncaoContext funcao() throws RecognitionException {
		FuncaoContext _localctx = new FuncaoContext(_ctx, getState());
		enterRule(_localctx, 30, RULE_funcao);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(272); match(FUNCTION);
			setState(273); corpodafuncao();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class CorpodafuncaoContext extends ParserRuleContext {
		public ListaparContext listapar() {
			return getRuleContext(ListaparContext.class,0);
		}
		public BlocoContext bloco() {
			return getRuleContext(BlocoContext.class,0);
		}
		public TerminalNode ABR_PAR() { return getToken(LuaParser.ABR_PAR, 0); }
		public TerminalNode END() { return getToken(LuaParser.END, 0); }
		public TerminalNode FEC_PAR() { return getToken(LuaParser.FEC_PAR, 0); }
		public CorpodafuncaoContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_corpodafuncao; }
	}

	public final CorpodafuncaoContext corpodafuncao() throws RecognitionException {
		CorpodafuncaoContext _localctx = new CorpodafuncaoContext(_ctx, getState());
		enterRule(_localctx, 32, RULE_corpodafuncao);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(275); match(ABR_PAR);
			setState(277);
			_la = _input.LA(1);
			if (_la==RETIC || _la==Nome) {
				{
				setState(276); listapar();
				}
			}

			setState(279); match(FEC_PAR);
			setState(280); bloco();
			setState(281); match(END);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ListaparContext extends ParserRuleContext {
		public TerminalNode RETIC() { return getToken(LuaParser.RETIC, 0); }
		public TerminalNode VIRGULA() { return getToken(LuaParser.VIRGULA, 0); }
		public ListadenomesContext listadenomes() {
			return getRuleContext(ListadenomesContext.class,0);
		}
		public ListaparContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_listapar; }
	}

	public final ListaparContext listapar() throws RecognitionException {
		ListaparContext _localctx = new ListaparContext(_ctx, getState());
		enterRule(_localctx, 34, RULE_listapar);
		int _la;
		try {
			setState(289);
			switch (_input.LA(1)) {
			case Nome:
				enterOuterAlt(_localctx, 1);
				{
				setState(283); listadenomes();
				setState(286);
				_la = _input.LA(1);
				if (_la==VIRGULA) {
					{
					setState(284); match(VIRGULA);
					setState(285); match(RETIC);
					}
				}

				}
				break;
			case RETIC:
				enterOuterAlt(_localctx, 2);
				{
				setState(288); match(RETIC);
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ConstrutortabelaContext extends ParserRuleContext {
		public TerminalNode FEC_CHA() { return getToken(LuaParser.FEC_CHA, 0); }
		public ListadecamposContext listadecampos() {
			return getRuleContext(ListadecamposContext.class,0);
		}
		public TerminalNode ABR_CHA() { return getToken(LuaParser.ABR_CHA, 0); }
		public ConstrutortabelaContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_construtortabela; }
	}

	public final ConstrutortabelaContext construtortabela() throws RecognitionException {
		ConstrutortabelaContext _localctx = new ConstrutortabelaContext(_ctx, getState());
		enterRule(_localctx, 36, RULE_construtortabela);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(291); match(ABR_CHA);
			setState(293);
			_la = _input.LA(1);
			if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << FUNCTION) | (1L << NIL) | (1L << FALSE) | (1L << TRUE) | (1L << RETIC) | (1L << ABR_COL) | (1L << ABR_PAR) | (1L << ABR_CHA) | (1L << Nome) | (1L << Numero) | (1L << Cadeia) | (1L << MENOS) | (1L << NOT) | (1L << CERQ))) != 0)) {
				{
				setState(292); listadecampos();
				}
			}

			setState(295); match(FEC_CHA);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ListadecamposContext extends ParserRuleContext {
		public List<CampoContext> campo() {
			return getRuleContexts(CampoContext.class);
		}
		public CampoContext campo(int i) {
			return getRuleContext(CampoContext.class,i);
		}
		public List<SeparadordecamposContext> separadordecampos() {
			return getRuleContexts(SeparadordecamposContext.class);
		}
		public SeparadordecamposContext separadordecampos(int i) {
			return getRuleContext(SeparadordecamposContext.class,i);
		}
		public ListadecamposContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_listadecampos; }
	}

	public final ListadecamposContext listadecampos() throws RecognitionException {
		ListadecamposContext _localctx = new ListadecamposContext(_ctx, getState());
		enterRule(_localctx, 38, RULE_listadecampos);
		int _la;
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			setState(297); campo();
			setState(303);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,29,_ctx);
			while ( _alt!=2 && _alt!=-1 ) {
				if ( _alt==1 ) {
					{
					{
					setState(298); separadordecampos();
					setState(299); campo();
					}
					} 
				}
				setState(305);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,29,_ctx);
			}
			setState(307);
			_la = _input.LA(1);
			if (_la==VIRGULA || _la==PON_VIR) {
				{
				setState(306); separadordecampos();
				}
			}

			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class CampoContext extends ParserRuleContext {
		public TerminalNode ATRIB() { return getToken(LuaParser.ATRIB, 0); }
		public TerminalNode ABR_COL() { return getToken(LuaParser.ABR_COL, 0); }
		public List<ExpContext> exp() {
			return getRuleContexts(ExpContext.class);
		}
		public TerminalNode FEC_COL() { return getToken(LuaParser.FEC_COL, 0); }
		public ExpContext exp(int i) {
			return getRuleContext(ExpContext.class,i);
		}
		public TerminalNode Nome() { return getToken(LuaParser.Nome, 0); }
		public CampoContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_campo; }
	}

	public final CampoContext campo() throws RecognitionException {
		CampoContext _localctx = new CampoContext(_ctx, getState());
		enterRule(_localctx, 40, RULE_campo);
		try {
			setState(319);
			switch ( getInterpreter().adaptivePredict(_input,31,_ctx) ) {
			case 1:
				enterOuterAlt(_localctx, 1);
				{
				setState(309); match(ABR_COL);
				setState(310); exp(0);
				setState(311); match(FEC_COL);
				setState(312); match(ATRIB);
				setState(313); exp(0);
				}
				break;

			case 2:
				enterOuterAlt(_localctx, 2);
				{
				setState(315); match(Nome);
				setState(316); match(ATRIB);
				setState(317); exp(0);
				}
				break;

			case 3:
				enterOuterAlt(_localctx, 3);
				{
				setState(318); exp(0);
				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class SeparadordecamposContext extends ParserRuleContext {
		public TerminalNode VIRGULA() { return getToken(LuaParser.VIRGULA, 0); }
		public TerminalNode PON_VIR() { return getToken(LuaParser.PON_VIR, 0); }
		public SeparadordecamposContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_separadordecampos; }
	}

	public final SeparadordecamposContext separadordecampos() throws RecognitionException {
		SeparadordecamposContext _localctx = new SeparadordecamposContext(_ctx, getState());
		enterRule(_localctx, 42, RULE_separadordecampos);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(321);
			_la = _input.LA(1);
			if ( !(_la==VIRGULA || _la==PON_VIR) ) {
			_errHandler.recoverInline(this);
			}
			consume();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class OpbinContext extends ParserRuleContext {
		public TerminalNode MAIS() { return getToken(LuaParser.MAIS, 0); }
		public TerminalNode EXP() { return getToken(LuaParser.EXP, 0); }
		public TerminalNode CONCAT() { return getToken(LuaParser.CONCAT, 0); }
		public TerminalNode MENOS() { return getToken(LuaParser.MENOS, 0); }
		public TerminalNode DIFE() { return getToken(LuaParser.DIFE, 0); }
		public TerminalNode MOD() { return getToken(LuaParser.MOD, 0); }
		public TerminalNode MENOR() { return getToken(LuaParser.MENOR, 0); }
		public TerminalNode OR() { return getToken(LuaParser.OR, 0); }
		public TerminalNode IGUAL() { return getToken(LuaParser.IGUAL, 0); }
		public TerminalNode DIV() { return getToken(LuaParser.DIV, 0); }
		public TerminalNode AND() { return getToken(LuaParser.AND, 0); }
		public TerminalNode MUL() { return getToken(LuaParser.MUL, 0); }
		public TerminalNode MENOR_IGUAL() { return getToken(LuaParser.MENOR_IGUAL, 0); }
		public TerminalNode MAIOR_IGUAL() { return getToken(LuaParser.MAIOR_IGUAL, 0); }
		public TerminalNode MAIOR() { return getToken(LuaParser.MAIOR, 0); }
		public OpbinContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_opbin; }
	}

	public final OpbinContext opbin() throws RecognitionException {
		OpbinContext _localctx = new OpbinContext(_ctx, getState());
		enterRule(_localctx, 44, RULE_opbin);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(323);
			_la = _input.LA(1);
			if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << MAIS) | (1L << MENOS) | (1L << MUL) | (1L << DIV) | (1L << EXP) | (1L << MOD) | (1L << CONCAT) | (1L << MENOR) | (1L << MENOR_IGUAL) | (1L << MAIOR) | (1L << MAIOR_IGUAL) | (1L << IGUAL) | (1L << DIFE) | (1L << AND) | (1L << OR))) != 0)) ) {
			_errHandler.recoverInline(this);
			}
			consume();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class OpunariaContext extends ParserRuleContext {
		public TerminalNode CERQ() { return getToken(LuaParser.CERQ, 0); }
		public TerminalNode NOT() { return getToken(LuaParser.NOT, 0); }
		public TerminalNode MENOS() { return getToken(LuaParser.MENOS, 0); }
		public OpunariaContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_opunaria; }
	}

	public final OpunariaContext opunaria() throws RecognitionException {
		OpunariaContext _localctx = new OpunariaContext(_ctx, getState());
		enterRule(_localctx, 46, RULE_opunaria);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(325);
			_la = _input.LA(1);
			if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << MENOS) | (1L << NOT) | (1L << CERQ))) != 0)) ) {
			_errHandler.recoverInline(this);
			}
			consume();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
		switch (ruleIndex) {
		case 10: return exp_sempred((ExpContext)_localctx, predIndex);
		}
		return true;
	}
	private boolean exp_sempred(ExpContext _localctx, int predIndex) {
		switch (predIndex) {
		case 0: return 2 >= _localctx._p;
		}
		return true;
	}

	public static final String _serializedATN =
		"\2\38\u014a\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4"+
		"\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20"+
		"\4\21\t\21\4\22\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27"+
		"\4\30\t\30\4\31\t\31\3\2\3\2\3\3\3\3\5\3\67\n\3\7\39\n\3\f\3\16\3<\13"+
		"\3\3\3\3\3\5\3@\n\3\5\3B\n\3\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3"+
		"\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5"+
		"\3\5\3\5\3\5\7\5c\n\5\f\5\16\5f\13\5\3\5\3\5\5\5j\n\5\3\5\3\5\3\5\3\5"+
		"\3\5\3\5\3\5\3\5\3\5\3\5\5\5v\n\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5"+
		"\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\5\5\u0091"+
		"\n\5\5\5\u0093\n\5\3\6\3\6\5\6\u0097\n\6\3\6\5\6\u009a\n\6\3\7\3\7\3\7"+
		"\3\7\3\7\7\7\u00a1\n\7\f\7\16\7\u00a4\13\7\3\7\3\7\5\7\u00a8\n\7\3\b\3"+
		"\b\3\b\7\b\u00ad\n\b\f\b\16\b\u00b0\13\b\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3"+
		"\t\3\t\3\t\3\t\3\t\5\t\u00be\n\t\3\n\3\n\3\n\7\n\u00c3\n\n\f\n\16\n\u00c6"+
		"\13\n\3\13\3\13\3\13\7\13\u00cb\n\13\f\13\16\13\u00ce\13\13\3\13\3\13"+
		"\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\5\f\u00df\n\f\3\f"+
		"\3\f\3\f\3\f\7\f\u00e5\n\f\f\f\16\f\u00e8\13\f\3\r\3\r\3\r\3\r\3\r\3\r"+
		"\3\r\3\r\5\r\u00f2\n\r\3\16\3\16\3\16\3\16\3\16\3\16\5\16\u00fa\n\16\3"+
		"\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\7\17\u0105\n\17\f\17\16\17"+
		"\u0108\13\17\3\20\3\20\5\20\u010c\n\20\3\20\3\20\3\20\5\20\u0111\n\20"+
		"\3\21\3\21\3\21\3\22\3\22\5\22\u0118\n\22\3\22\3\22\3\22\3\22\3\23\3\23"+
		"\3\23\5\23\u0121\n\23\3\23\5\23\u0124\n\23\3\24\3\24\5\24\u0128\n\24\3"+
		"\24\3\24\3\25\3\25\3\25\3\25\7\25\u0130\n\25\f\25\16\25\u0133\13\25\3"+
		"\25\5\25\u0136\n\25\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26"+
		"\5\26\u0142\n\26\3\27\3\27\3\30\3\30\3\31\3\31\3\31\2\32\2\4\6\b\n\f\16"+
		"\20\22\24\26\30\32\34\36 \"$&(*,.\60\2\5\4\30\30\32\32\3(\66\4))\678\u0166"+
		"\2\62\3\2\2\2\4:\3\2\2\2\6C\3\2\2\2\b\u0092\3\2\2\2\n\u0099\3\2\2\2\f"+
		"\u009b\3\2\2\2\16\u00a9\3\2\2\2\20\u00bd\3\2\2\2\22\u00bf\3\2\2\2\24\u00cc"+
		"\3\2\2\2\26\u00de\3\2\2\2\30\u00f1\3\2\2\2\32\u00f9\3\2\2\2\34\u00fb\3"+
		"\2\2\2\36\u0110\3\2\2\2 \u0112\3\2\2\2\"\u0115\3\2\2\2$\u0123\3\2\2\2"+
		"&\u0125\3\2\2\2(\u012b\3\2\2\2*\u0141\3\2\2\2,\u0143\3\2\2\2.\u0145\3"+
		"\2\2\2\60\u0147\3\2\2\2\62\63\5\4\3\2\63\3\3\2\2\2\64\66\5\b\5\2\65\67"+
		"\7\32\2\2\66\65\3\2\2\2\66\67\3\2\2\2\679\3\2\2\28\64\3\2\2\29<\3\2\2"+
		"\2:8\3\2\2\2:;\3\2\2\2;A\3\2\2\2<:\3\2\2\2=?\5\n\6\2>@\7\32\2\2?>\3\2"+
		"\2\2?@\3\2\2\2@B\3\2\2\2A=\3\2\2\2AB\3\2\2\2B\5\3\2\2\2CD\5\4\3\2D\7\3"+
		"\2\2\2EF\5\16\b\2FG\7\31\2\2GH\5\24\13\2H\u0093\3\2\2\2I\u0093\5\30\r"+
		"\2JK\7\4\2\2KL\5\6\4\2LM\7\13\2\2M\u0093\3\2\2\2NO\7\6\2\2OP\5\26\f\2"+
		"PQ\7\4\2\2QR\5\6\4\2RS\7\13\2\2S\u0093\3\2\2\2TU\7\3\2\2UV\5\6\4\2VW\7"+
		"\5\2\2WX\5\26\f\2X\u0093\3\2\2\2YZ\7\7\2\2Z[\5\26\f\2[\\\7\b\2\2\\d\5"+
		"\6\4\2]^\7\n\2\2^_\5\26\f\2_`\7\b\2\2`a\5\6\4\2ac\3\2\2\2b]\3\2\2\2cf"+
		"\3\2\2\2db\3\2\2\2de\3\2\2\2ei\3\2\2\2fd\3\2\2\2gh\7\t\2\2hj\5\6\4\2i"+
		"g\3\2\2\2ij\3\2\2\2jk\3\2\2\2kl\7\13\2\2l\u0093\3\2\2\2mn\7\f\2\2no\7"+
		"%\2\2op\7\31\2\2pq\5\26\f\2qr\7\30\2\2ru\5\26\f\2st\7\30\2\2tv\5\26\f"+
		"\2us\3\2\2\2uv\3\2\2\2vw\3\2\2\2wx\7\4\2\2xy\5\6\4\2yz\7\13\2\2z\u0093"+
		"\3\2\2\2{|\7\f\2\2|}\5\22\n\2}~\7\20\2\2~\177\5\24\13\2\177\u0080\7\4"+
		"\2\2\u0080\u0081\5\6\4\2\u0081\u0082\7\13\2\2\u0082\u0093\3\2\2\2\u0083"+
		"\u0084\7\r\2\2\u0084\u0085\5\f\7\2\u0085\u0086\5\"\22\2\u0086\u0093\3"+
		"\2\2\2\u0087\u0088\7\21\2\2\u0088\u0089\7\r\2\2\u0089\u008a\7%\2\2\u008a"+
		"\u008b\b\5\1\2\u008b\u0093\5\"\22\2\u008c\u008d\7\21\2\2\u008d\u0090\5"+
		"\22\n\2\u008e\u008f\7\31\2\2\u008f\u0091\5\24\13\2\u0090\u008e\3\2\2\2"+
		"\u0090\u0091\3\2\2\2\u0091\u0093\3\2\2\2\u0092E\3\2\2\2\u0092I\3\2\2\2"+
		"\u0092J\3\2\2\2\u0092N\3\2\2\2\u0092T\3\2\2\2\u0092Y\3\2\2\2\u0092m\3"+
		"\2\2\2\u0092{\3\2\2\2\u0092\u0083\3\2\2\2\u0092\u0087\3\2\2\2\u0092\u008c"+
		"\3\2\2\2\u0093\t\3\2\2\2\u0094\u0096\7\16\2\2\u0095\u0097\5\24\13\2\u0096"+
		"\u0095\3\2\2\2\u0096\u0097\3\2\2\2\u0097\u009a\3\2\2\2\u0098\u009a\7\17"+
		"\2\2\u0099\u0094\3\2\2\2\u0099\u0098\3\2\2\2\u009a\13\3\2\2\2\u009b\u009c"+
		"\7%\2\2\u009c\u00a2\b\7\1\2\u009d\u009e\7\26\2\2\u009e\u009f\7%\2\2\u009f"+
		"\u00a1\b\7\1\2\u00a0\u009d\3\2\2\2\u00a1\u00a4\3\2\2\2\u00a2\u00a0\3\2"+
		"\2\2\u00a2\u00a3\3\2\2\2\u00a3\u00a7\3\2\2\2\u00a4\u00a2\3\2\2\2\u00a5"+
		"\u00a6\7\27\2\2\u00a6\u00a8\7%\2\2\u00a7\u00a5\3\2\2\2\u00a7\u00a8\3\2"+
		"\2\2\u00a8\r\3\2\2\2\u00a9\u00ae\5\20\t\2\u00aa\u00ab\7\30\2\2\u00ab\u00ad"+
		"\5\20\t\2\u00ac\u00aa\3\2\2\2\u00ad\u00b0\3\2\2\2\u00ae\u00ac\3\2\2\2"+
		"\u00ae\u00af\3\2\2\2\u00af\17\3\2\2\2\u00b0\u00ae\3\2\2\2\u00b1\u00b2"+
		"\7%\2\2\u00b2\u00be\b\t\1\2\u00b3\u00b4\5\34\17\2\u00b4\u00b5\7\35\2\2"+
		"\u00b5\u00b6\5\26\f\2\u00b6\u00b7\7\36\2\2\u00b7\u00be\3\2\2\2\u00b8\u00b9"+
		"\5\34\17\2\u00b9\u00ba\7\26\2\2\u00ba\u00bb\7%\2\2\u00bb\u00bc\b\t\1\2"+
		"\u00bc\u00be\3\2\2\2\u00bd\u00b1\3\2\2\2\u00bd\u00b3\3\2\2\2\u00bd\u00b8"+
		"\3\2\2\2\u00be\21\3\2\2\2\u00bf\u00c4\7%\2\2\u00c0\u00c1\7\30\2\2\u00c1"+
		"\u00c3\7%\2\2\u00c2\u00c0\3\2\2\2\u00c3\u00c6\3\2\2\2\u00c4\u00c2\3\2"+
		"\2\2\u00c4\u00c5\3\2\2\2\u00c5\23\3\2\2\2\u00c6\u00c4\3\2\2\2\u00c7\u00c8"+
		"\5\26\f\2\u00c8\u00c9\7\30\2\2\u00c9\u00cb\3\2\2\2\u00ca\u00c7\3\2\2\2"+
		"\u00cb\u00ce\3\2\2\2\u00cc\u00ca\3\2\2\2\u00cc\u00cd\3\2\2\2\u00cd\u00cf"+
		"\3\2\2\2\u00ce\u00cc\3\2\2\2\u00cf\u00d0\5\26\f\2\u00d0\25\3\2\2\2\u00d1"+
		"\u00d2\b\f\1\2\u00d2\u00d3\5\60\31\2\u00d3\u00d4\5\26\f\2\u00d4\u00df"+
		"\3\2\2\2\u00d5\u00df\7\22\2\2\u00d6\u00df\7\24\2\2\u00d7\u00df\7\25\2"+
		"\2\u00d8\u00df\7&\2\2\u00d9\u00df\7\'\2\2\u00da\u00df\7\33\2\2\u00db\u00df"+
		"\5 \21\2\u00dc\u00df\5\32\16\2\u00dd\u00df\5&\24\2\u00de\u00d1\3\2\2\2"+
		"\u00de\u00d5\3\2\2\2\u00de\u00d6\3\2\2\2\u00de\u00d7\3\2\2\2\u00de\u00d8"+
		"\3\2\2\2\u00de\u00d9\3\2\2\2\u00de\u00da\3\2\2\2\u00de\u00db\3\2\2\2\u00de"+
		"\u00dc\3\2\2\2\u00de\u00dd\3\2\2\2\u00df\u00e6\3\2\2\2\u00e0\u00e1\6\f"+
		"\2\3\u00e1\u00e2\5.\30\2\u00e2\u00e3\5\26\f\2\u00e3\u00e5\3\2\2\2\u00e4"+
		"\u00e0\3\2\2\2\u00e5\u00e8\3\2\2\2\u00e6\u00e4\3\2\2\2\u00e6\u00e7\3\2"+
		"\2\2\u00e7\27\3\2\2\2\u00e8\u00e6\3\2\2\2\u00e9\u00ea\5\34\17\2\u00ea"+
		"\u00eb\5\36\20\2\u00eb\u00f2\3\2\2\2\u00ec\u00ed\5\34\17\2\u00ed\u00ee"+
		"\7\27\2\2\u00ee\u00ef\7%\2\2\u00ef\u00f0\5\36\20\2\u00f0\u00f2\3\2\2\2"+
		"\u00f1\u00e9\3\2\2\2\u00f1\u00ec\3\2\2\2\u00f2\31\3\2\2\2\u00f3\u00fa"+
		"\5\20\t\2\u00f4\u00fa\5\30\r\2\u00f5\u00f6\7\37\2\2\u00f6\u00f7\5\26\f"+
		"\2\u00f7\u00f8\7 \2\2\u00f8\u00fa\3\2\2\2\u00f9\u00f3\3\2\2\2\u00f9\u00f4"+
		"\3\2\2\2\u00f9\u00f5\3\2\2\2\u00fa\33\3\2\2\2\u00fb\u00fc\7%\2\2\u00fc"+
		"\u0106\b\17\1\2\u00fd\u00fe\7\35\2\2\u00fe\u00ff\5\26\f\2\u00ff\u0100"+
		"\7\36\2\2\u0100\u0105\3\2\2\2\u0101\u0102\7\26\2\2\u0102\u0103\7%\2\2"+
		"\u0103\u0105\b\17\1\2\u0104\u00fd\3\2\2\2\u0104\u0101\3\2\2\2\u0105\u0108"+
		"\3\2\2\2\u0106\u0104\3\2\2\2\u0106\u0107\3\2\2\2\u0107\35\3\2\2\2\u0108"+
		"\u0106\3\2\2\2\u0109\u010b\7\37\2\2\u010a\u010c\5\24\13\2\u010b\u010a"+
		"\3\2\2\2\u010b\u010c\3\2\2\2\u010c\u010d\3\2\2\2\u010d\u0111\7 \2\2\u010e"+
		"\u0111\5&\24\2\u010f\u0111\7\'\2\2\u0110\u0109\3\2\2\2\u0110\u010e\3\2"+
		"\2\2\u0110\u010f\3\2\2\2\u0111\37\3\2\2\2\u0112\u0113\7\r\2\2\u0113\u0114"+
		"\5\"\22\2\u0114!\3\2\2\2\u0115\u0117\7\37\2\2\u0116\u0118\5$\23\2\u0117"+
		"\u0116\3\2\2\2\u0117\u0118\3\2\2\2\u0118\u0119\3\2\2\2\u0119\u011a\7 "+
		"\2\2\u011a\u011b\5\6\4\2\u011b\u011c\7\13\2\2\u011c#\3\2\2\2\u011d\u0120"+
		"\5\22\n\2\u011e\u011f\7\30\2\2\u011f\u0121\7\33\2\2\u0120\u011e\3\2\2"+
		"\2\u0120\u0121\3\2\2\2\u0121\u0124\3\2\2\2\u0122\u0124\7\33\2\2\u0123"+
		"\u011d\3\2\2\2\u0123\u0122\3\2\2\2\u0124%\3\2\2\2\u0125\u0127\7!\2\2\u0126"+
		"\u0128\5(\25\2\u0127\u0126\3\2\2\2\u0127\u0128\3\2\2\2\u0128\u0129\3\2"+
		"\2\2\u0129\u012a\7\"\2\2\u012a\'\3\2\2\2\u012b\u0131\5*\26\2\u012c\u012d"+
		"\5,\27\2\u012d\u012e\5*\26\2\u012e\u0130\3\2\2\2\u012f\u012c\3\2\2\2\u0130"+
		"\u0133\3\2\2\2\u0131\u012f\3\2\2\2\u0131\u0132\3\2\2\2\u0132\u0135\3\2"+
		"\2\2\u0133\u0131\3\2\2\2\u0134\u0136\5,\27\2\u0135\u0134\3\2\2\2\u0135"+
		"\u0136\3\2\2\2\u0136)\3\2\2\2\u0137\u0138\7\35\2\2\u0138\u0139\5\26\f"+
		"\2\u0139\u013a\7\36\2\2\u013a\u013b\7\31\2\2\u013b\u013c\5\26\f\2\u013c"+
		"\u0142\3\2\2\2\u013d\u013e\7%\2\2\u013e\u013f\7\31\2\2\u013f\u0142\5\26"+
		"\f\2\u0140\u0142\5\26\f\2\u0141\u0137\3\2\2\2\u0141\u013d\3\2\2\2\u0141"+
		"\u0140\3\2\2\2\u0142+\3\2\2\2\u0143\u0144\t\2\2\2\u0144-\3\2\2\2\u0145"+
		"\u0146\t\3\2\2\u0146/\3\2\2\2\u0147\u0148\t\4\2\2\u0148\61\3\2\2\2\"\66"+
		":?Adiu\u0090\u0092\u0096\u0099\u00a2\u00a7\u00ae\u00bd\u00c4\u00cc\u00de"+
		"\u00e6\u00f1\u00f9\u0104\u0106\u010b\u0110\u0117\u0120\u0123\u0127\u0131"+
		"\u0135\u0141";
	public static final ATN _ATN =
		ATNSimulator.deserialize(_serializedATN.toCharArray());
	static {
		_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
	}
}